package com.anuyun.ms.base.context;

import com.anuyun.ms.base.auth.TenantUser;

/**
 * 用户本地线程上下文
 * @author yufeng
 *
 */
public class UserContext {
	public static ThreadLocal<TenantUser>   LOCAL_TENANT_USER= new ThreadLocal<>();
	
	public static String getUserId() {
		return LOCAL_TENANT_USER.get().getId();
	}
	
	public static String  getUserName () {
		return LOCAL_TENANT_USER.get().getUserName();
	}
	
	public static String getTenantId () {
		return LOCAL_TENANT_USER.get().getTenantId();
	}
	
	
}
